import java.util.Scanner;

public class rightReverse {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        String s = sc.next();
        String newString = rightReverse(n, s);
        System.out.println(newString);
    }

    public static String rightReverse(int n, String s) {
        String rightString = "";
        String leftString = "";
        //1、遍历前 s.length() - n字符串
        for (int i = 0; i < s.length() - n; i++) {
            rightString += s.charAt(i);
        }
        //2、遍历后 n字符串
        for (int i = s.length() - n; i < s.length(); i++) {
            leftString += s.charAt(i);
        }
        //3、返回新字符串
        return leftString + rightString;
    }
}
